feat(api chart): allow customizing api chart with query or body parameters#278
Open
arnaud-moncel wants to merge 3 commits intomainfrom
Open
feat(api chart): allow customizing api chart with query or body parameters#278arnaud-moncel wants to merge 3 commits intomainfrom
arnaud-moncel wants to merge 3 commits intomainfrom
Conversation
5 new issues
|
| end | ||
|
|
||
| def render_chart(caller, name, record_id) | ||
| def render_chart(caller, name, record_id, parameters = {}) |
| attr_reader :composite_record_id, :parameters | ||
|
|
||
| def initialize(collection, caller, record_id) | ||
| def initialize(collection, caller, record_id, parameters = {}) |
| end | ||
|
|
||
| def render_chart(_caller, name, _record_id) | ||
| def render_chart(_caller, name, _record_id, _parameters = {}) |
|
|
||
| def render_chart(caller, name, record_id) | ||
| @child_collection.render_chart(caller, name, record_id) | ||
| def render_chart(caller, name, record_id, parameters = {}) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Definition of Done
General
Security
Note
Allow API chart handlers to receive query and body parameters
QueryStringParser.parse_chart_parametersto extract scalar (non-hash, non-array, non-nil) request params and pass them through torender_charton both collection and datasource chart routes.ChartContextand the newDatasourceChartContextwith a frozenparametersattr, making request params accessible to custom chart handlers.render_chartsignatures across the decorator stack, RPC datasource/collection, and toolkit base classes to accept and forward aparameters = {}hash.parametersfrom the incoming payload and forward them torender_chart, completing the end-to-end propagation.Macroscope summarized d833fcf.